home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * ProgressDlg.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
-
- if (!IS.isModuleInitialized("IS.NOF.DIALOGS.ProgressDlg"))
- {
-
- /****h* NOF_JavaScript_Library/NOF.DIALOGS.ProgressDlg
- *
- * NAME
- * NOF.DIALOGS.ProgressDlg
- *
- * DESCRIPTION
- *
- * The <code>ProgressDlg</code> class displays a progress dialog
- * External dependencies: NOF.App
- ****/
-
- /**
- * constructor
- **/
- function DIALOGS_ProgressDlg() {
- this.__proto__ = DIALOGS_ProgressDlg.prototype;
- }
- {
- var member = DIALOGS_ProgressDlg.prototype;
- member.CLASS_NAME = "DIALOGS.ProgressDlg";
-
- var method = DIALOGS_ProgressDlg.prototype;
- /*
- open(String pTitle, String pText, int pMin, int pMax, boolean pPercent)
- boolean close(int pTimeout)
- boolean setMessage(String pMessage)
- setRange(int pMin, int pMax)
- boolean setPosition(int pPos)
- */
-
- /**
- * Opens a progress dialog with title displayed in the title bar,
- * text displayed in the message field next to the progress bar.
- * The minimum and maximum values for the progress bar are specified by pMin and pMax.
- * If the progress bar should show percentage values rather than absolute values specify true for pPercent.
- * The message text can be modified at any time by calling setMessage.
- * The minimum and maximum values can be set by calling setRange.
- * The position of the progress bar is set by calling setPosition.
- * The progress dialog is closed by calling close, see below.
- * The progress dialog is automatically closed when an script is completed if it hasn't already been closed.
- *
- * @param title specifies the text displayed in the title bar of the dialog.
- * @param text specifies the text displayed in the dialog.
- * @param pMin
- * @param pMax
- * @param pPercent
- **/
- method.open = function (/*String*/ title,/*String*/ text, /*int*/ pMin, /*int*/ pMax, /*boolean*/ pPercent) {
- NOF.App.getFSIApp().OpenProgressDialog(title, text, pMin, pMax, pPercent);
- }
-
- /**
- * Closes the progress dialog.
- *
- * @param pTimeout specifies a number of milliseconds to wait before closing the dialog.
- * @return true if the user has clicked the cancel button, otherwise it will return false.
- **/
- method.close = function (/*int*/ pTimeout) {
- return NOF.App.getFSIApp().CloseProgressDialog(pTimeout);
- }
-
- /**
- * Sets the message displayed next to the progress bar.
- *
- * @param text specifies the new text to be displayed in the dialog.
- * @return true if the user has clicked the cancel button, otherwise it will return false.
- **/
- method.setMessage = function (/*String*/ text) {
- return NOF.App.getFSIApp().SetProgressMessage(text);
- }
-
- /**
- * sets the range for the progress bar. You also set the progress range when creating
- * the progress dialog, but this function may be needed if you show progress for
- * different operations where you reset the progress bar.
- *
- * @param pMin
- * @param pMax
- **/
- method.setRange = function (/*int*/ pMin, /*int*/ pMax) {
- return NOF.App.getFSIApp().SetProgressRange(pMin, pMax);
- }
-
- /**
- * sets the position of the progress bar. This is relative to the minimum and maximum values
- * defined in open() or setRange().
- *
- * @param pPos
- * @return true if the user has clicked the cancel button, otherwise it will return false.
- **/
- method.setPosition = function (/*int*/ pPos) {
- NOF.App.getFSIApp().SetProgressPosition(pPos);
- }
- }
- DIALOGS.__proto__.ProgressDlg = DIALOGS_ProgressDlg;
- }